import React from 'react';
import template from './../commonui/template';
import { Link } from 'react-router-dom';

class TwoPage extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            twoPageValue :"" 
        };
        debugger;       
    } 
    componentWillUpdate(nextProps, nextState) {
        if (this.props !== nextProps) {
            let {data} = nextProps.state;
            if (data&&data.content&&data.content.body) {
                this.state.twoPageValue = data.content.body;
            }
        }     
    }
    render() {
        return (
            <div>
            	this is twoPage : {this.state.twoPageValue}
                <Link to={'/testPage'}><div>go to test</div></Link>
            </div>
        )
    }
}
export default template({
    id: 'index',  
    component: TwoPage,
    url: 'twoPage.json'
});